package C10_12_ReplaceConstructorWithFactoryMethod.example3;

/**
 * 以明确函数创建子类
 */
public class Person {
    static Person createMale() {
        return new Male();
    }
    static Person createFemale() {
        return new Female();
    }
}
